package zuoye23.zuoye2;

public class Test {
    public static void main(String[] args) {
        //new一个javateacher实例
        JavaTeacher javaTeacher=new JavaTeacher();
        //设置实例的属性..
        javaTeacher.setName("老刘");
        javaTeacher.setAge(40);
        javaTeacher.setSeniority(10);
        javaTeacher.setSex("男");
        //调用父类自我介绍方法
        String s1 = javaTeacher.selfIntroduce();
        System.out.println(s1);
        //调用父类上课方法
        String s = javaTeacher.giveLession();
        System.out.println(s);

        UiTeacher uiTeacher = new UiTeacher();
        uiTeacher.setName("李凡");
        uiTeacher.setAge(27);
        uiTeacher.setSeniority(5);
        uiTeacher.setSex("男");
        String s2 = uiTeacher.selfIntroduce();
        String s3 = uiTeacher.giveLession();
        System.out.println(s2+"   "+s3);



    }
}
